package org.gap.domain;

import java.io.Serializable;

import javax.persistence.Id;

import javax.persistence.*;

/**
 */
public class EtablissementsBancairesPK implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */
	public EtablissementsBancairesPK() {
	}

	/**
	 */

	@Column(name = "ETB_PAYS", length = 3, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public String etbPays;
	/**
	 */

	@Column(name = "ETB_ETABLISSEMENT", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer etbEtablissement;

	/**
	 */
	public void setEtbPays(String etbPays) {
		this.etbPays = etbPays;
	}

	/**
	 */
	public String getEtbPays() {
		return this.etbPays;
	}

	/**
	 */
	public void setEtbEtablissement(Integer etbEtablissement) {
		this.etbEtablissement = etbEtablissement;
	}

	/**
	 */
	public Integer getEtbEtablissement() {
		return this.etbEtablissement;
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((etbPays == null) ? 0 : etbPays.hashCode()));
		result = (int) (prime * result + ((etbEtablissement == null) ? 0 : etbEtablissement.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof EtablissementsBancairesPK))
			return false;
		EtablissementsBancairesPK equalCheck = (EtablissementsBancairesPK) obj;
		if ((etbPays == null && equalCheck.etbPays != null) || (etbPays != null && equalCheck.etbPays == null))
			return false;
		if (etbPays != null && !etbPays.equals(equalCheck.etbPays))
			return false;
		if ((etbEtablissement == null && equalCheck.etbEtablissement != null) || (etbEtablissement != null && equalCheck.etbEtablissement == null))
			return false;
		if (etbEtablissement != null && !etbEtablissement.equals(equalCheck.etbEtablissement))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("EtablissementsBancairesPK");
		sb.append(" etbPays: ").append(getEtbPays());
		sb.append(" etbEtablissement: ").append(getEtbEtablissement());
		return sb.toString();
	}
}
